<?php $uri = $this->uri->segment(3,0);$menu = $this->uri->segment(4,0);?>
<script>
function setFocus(){
	$('identity').focus()
}

function box_message(titleMessage,message){
	box_message = new LightFace({ 
			title: titleMessage, 
			width : 300,
			content: "<div class='message'>"+message+"</div>"
			,
			buttons: [{ title: 'Close', edisi_content: function() { this.close();}, color: 'green'}]
		});
		box_message.open();	
}


window.addEvent('load', function(){
		
		$('description').mooEditable({
		actions: 'bold italic underline strikethrough | formatBlock justifyleft justifyright justifycenter justifyfull | insertunorderedlist insertorderedlist indent outdent insertHorizontalRule | undo redo removeformat | createlink unlink | urlimage | toggleview'
		});
		
	//setFocus();
        new FormCheck('edisi_content_add', {
		display : {
			errorsLocation : 1,
			showErrors : 1,
			addClassErrorToField : 1
		}
	})
});

</script>
<style type="text/css">
			#description{
				width: 700px;
				height: 200px;
				padding: 10px;
				border: 2px solid #ddd;
			}
			</style>
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
      <form name="edisi_content_add" id="edisi_content_add" method="post" enctype="multipart/form-data" action="<?php echo site_url(array('just4u','edisi_content_save',$uri,$menu))?>">
  <table width="0%" border="0" cellspacing="2" cellpadding="3">
    <tr>
      <th align="right">Category</th>
      <td><select name="category" id="category">
      	<?php 
      		
      		switch($menu){
      			case "sajian-utama" : echo "<option value='sajian-utama'>Sajian Utama</option>";break;
				case "review-web" 	: echo "<option value='review-web'>Review Web</option>";break;
				case "internet" 	: echo "<option value='internet'>Internet</option>";break;
				case "linux" 		: echo "<option value='linux'>Linux</option>";break;
				case "aplikasi" 	: echo "<option value='aplikasi'>Apliaksi</option>";break;
				case "hardware" 	: echo "<option value='hardware'>Hardware</option>";break;
				case "games"	 	: echo "<option value='games'>Games</option>";break;
				case "tips-n-trik" 	: echo "<option value='tips-n-trik'>Tips n' Trik</option>";break;
				case "android" 		: echo "<option value='android'>Android</option>";break;
      		}
      	?>
        <option value="sajian-utama">Sajian Utama</option>
        <option value="review-web">Review Web</option>
        <option value="internet">Internet</option>
        <option value="linux">Linux</option>
        <option value="aplikasi">Apliaksi</option>
        <option value="hardware">Hardware</option>
        <option value="games">Games</option>
        <option value="tips-n-trik">Tips n' Trik</option>
        <option value="android">Android</option>
      </select>
      <?php 
      	
		foreach ($query->result() as $re){
				$edisi = $re->id_edisi;
				$ke = $re->ke;
		}
      
      ?>
      <input type="hidden" name="edisi" id="edisi" value="<?php echo $edisi?>" /></td>
    </tr>
    <tr>
      <th align="right">Name</th>
      <td><input name="name" type="text" id="name" size="35" maxlength="100" class="validate['required']" /></td>
    </tr>
    <tr>
      <th align="right" valign="top"><p>Description</p>
        <p>&nbsp;</p></th>
      <td><textarea name="description" id="description" cols="45" rows="6" class="validate['required']"></textarea></td>
    </tr>
    <tr>
      <th align="right" valign="top">&nbsp;</th>
      <td align="right"><input type="reset" name="button2" id="button2" value="Reset" class="uiButtonRounded" />
        <input type="submit" name="button" id="button" value="Save" class="uiButtonRounded" /></td>
    </tr>
  </table>
</form>
    </td>
    <td width="30%" valign="top">&nbsp;</td>
  </tr>
</table>
